{% set namespace = "AWS/Athena" %}
{% set dff_api_title = "AWS-Athena Collection" %}
{% set dff_api_crontab = "* * * * *" %}

{% extends "base_template" %}
{% block import %}
{{ super() }}
import integration_aws_cloudwatch__main as monitor_main
{% endblock %}

{% block account %}
{{ super() }}
{% endblock %}

{% block collect_configs %}
cloudwatch_configs = {
    'regions': {{ repr(collector.regions) }},
    'targets': [
        {
            'namespace': '{{ namespace }}',
            'metrics'  : {{ repr(collector.metrics) }}
        },
    ],
}
{% endblock %}

{% block filters%}
{% endblock %}

{% block run %}
@DFF.API('{{dff_api_title}}', timeout=300, fixed_crontab='{{dff_api_crontab}}')
def run():
    collectors = [
        cloudwatch_main.DataCollector(account, cloudwatch_configs),
    ]
    Runner(collectors).run()
{% endblock %}
